// 购物车接口封装
import request from '@/utils/request'
export const getCartTotal = () => {
  return request.get('/cart/total')
}

export const addCart = (data) => {
  return request.post('/cart/add', data)
}

// 获取购物车列表
export const getCartList = () => {
  return request.get('/cart/list')
}

//  更新购物车数量
export const updateCartNum = (data) => {
  return request.post('/cart/update', data)
}

// 逻辑删除购物车
export const updateDel = (id) => {
  return request.post('/cart/clear', {
    cartIds: id
  })
}
